layui.use(['form','jquery','layer'], function() {
    var form = layui.form;
    var $ = layui.jquery;
    var layer = layui.layer;

    form.on("submit(formDemo)",function (data) {
        if(data.field.feedbackStatus=="yes"){
            feedbackStatus="4";
        }else{
            feedbackStatus="6";
        }
        var updateId = localStorage.getItem("userId");
        var json = {
            remarks:$("#remarks").val(),
            feedbackStatus:feedbackStatus,
            updateId:updateId,
            feedbackId:$("#feedbackId").val()
        }
        $.ajax({
            url:'/feedback/UpdateFeedback',
            data:json,
            dataType:"json",
            Type:"post",
            success:function (data) {
                var index  = parent.layer.getFrameIndex(window.name);
                parent.location.reload();
                parent.layer.close(index);
            }
        });
        return false;
    });

    $('#quxiao').click(function () {
        var index = parent.layer.getFrameIndex(window.name);
        parent.layer.close(index);//关闭当前页
    });

});